Live stream manifests for on demand content

ABSTRACT

Disclosed are various embodiments for requesting fragments of a media item. A latency to a media distribution service and bandwidth for a client are estimated. A time to request a subsequent fragment from the media item is determined. Sources for the fragment are scored and one of the sources is selected. The fragment is requested from the selected source.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of, claims the benefit of, andpriority to U.S. Pat. No. 9,686,332 entitled “LIVE STREAM MANIFESTS FORON DEMAND CONTENT,” granted on Jun. 20, 2017, the contents of which arehereby incorporated by reference in their entirety herein.

BACKGROUND

Clients may stream media over a network. Such media may include video,audio, or other data. Network conditions may change during the stream ofmedia to the client.

BRIEF DESCRIPTION OF THE DRAWINGS

Many aspects of the present disclosure can be better understood withreference to the following drawings. The components in the drawings arenot necessarily to scale, with emphasis instead being placed uponclearly illustrating the principles of the disclosure. Moreover, in thedrawings, like reference numerals designate corresponding partsthroughout the several views.

FIG. 1 is a pictorial representation of an example scenario according tovarious embodiments of the present disclosure.

FIG. 2 is a drawing of a networked environment according to variousembodiments of the present disclosure.

FIGS. 3 and 4 are flowcharts illustrating one example of functionalityimplemented as portions of a manifest generation service executed in acomputing environment in the networked environment of FIG. 2 accordingto various embodiments of the present disclosure.

FIG. 5 is a flowcharts illustrating one example of functionalityimplemented as portions of a client application executed in a client inthe networked environment of FIG. 2 according to various embodiments ofthe present disclosure.

FIG. 6 is a schematic block diagram that provides one exampleillustration of a computing environment employed in the networkedenvironment of FIG. 2 according to various embodiments of the presentdisclosure.

FIG. 7 is a schematic block diagram that provides one exampleillustration of a client employed in the networked environment of FIG. 2according to various embodiments of the present disclosure.

DETAILED DESCRIPTION

Media distribution services facilitating streams of media may accesscontent encoded in varying bit rates in order to adapt to changes innetwork conditions. For example, a live media stream may include a mediafeed provided to multiple encoders, each encoding the media feed into adifferent bit rate. As another example, a fully stored, or “on demand”media item may be divided into many portions. These portions may besegments of time, location, or other units. Each of these segments oftime may then each be encoded into fragments of differing bit rates,resolutions, or other attributes. As network conditions change, a clientwould request a sequentially next fragment of the stream that issuitable for the current network conditions.

For a media distribution service distributing a live stream of content,the media distribution service may repeatedly communicate manifests to aclient throughout the duration of the live stream. The manifestsindicate currently available sources for streaming data, andcorresponding metadata. The client then selects a source from themanifest to request a sequentially next portion of the live stream. Themanifest file would include Uniform Resource Locators (URLs), networkaddresses, or other source identifiers from which the client may requestportions of the stream at a corresponding bit rate. For mediadistribution service distributing media on demand, the versionsavailable for a given media item may be indicated in a manifest filecommunicated to the client at the beginning of the stream. The clientdetermines, based on current network conditions, which sequentially nextfragment of the stream should be requested, and then communicates arequest to the source indicated in the manifest. Under this approach, asthe client decides the appropriate fragment to request, the mediadistribution service cannot control which fragments the client willrequest.

In some embodiments, a manifest generation service estimates thebandwidth available to the client during a stream of on demand content.This may be performed using bandwidth updates communicated by theclient, performed by accessing the state of a buffer of the client, orperformed by another approach. The manifest generation service thendetermines, from the available fragments for the streaming media item, asequentially next fragment of the stream to be communicated to theclient. A manifest is then generated indicating the determined fragmentand corresponding source identifier, but excluding source identifiersfor other fragments that may be available for the corresponding segmentof the media item. As the client receives a manifest indicating only onefragment, it must request the indicated fragment. The manifestgeneration service repeatedly generates a manifest according to thisapproach so that the client is requesting stream data as determined bythe manifest generation service.

In other embodiments, a client application may be configured todetermine an estimated bandwidth and estimated latency to a mediadistribution service. Using the estimated bandwidth, estimated latency,and a state of a buffer of the client, the client application determinesa fragment to be requested next. The estimated latency may also be usedto determine when a request should be sent, so that a sequentially nextfragment of the steam begins downloading close to the conclusion of adownload of a currently downloading fragment of the stream.

In the following discussion, a general description of the system and itscomponents is provided, followed by a discussion of the operation of thesame.

With reference to FIG. 1, shown is an example scenario of a stream ofvideo content according to various embodiments of the presentdisclosure. Server 101 facilitates the operation of a media distributionservice that communicates on demand media content to a client 104 via anetwork 107. The server 101 communicates the on demand content as acontent stream 111 of content fragments 114 to the client 104. Thecontent fragments 114 are portions or subdivisions of a media item asrequested by the client 104, and may be known as “chunks” or “blocks” ofa stream. The server 101 also communicates a manifest 117 indicatingURLs or other identifying data from which content fragments 114 may berequested. Although the discussion below may discuss the dataidentifying network locations to which requests are sent as URLs, it isunderstood that other identifying data may also be used. The server 101may be configured to repeatedly communicate manifests 117 to the client104 indicating a single source of content fragments 114, therebylimiting the choice of bit rate by the client 104 to the single source.As content fragments 114 are downloaded by the client 104 via thenetwork 107, the client 104 renders the data encoded in the contentfragments 114 on the display 121, thereby generating the image 124.

Turning now to FIG. 2, shown is a networked environment 200 according tovarious embodiments. The networked environment 200 includes a computingenvironment 201 and a client 104 (FIG. 1), which are in datacommunication with each other via a network 107 (FIG. 1). The network107 includes, for example, the Internet, intranets, extranets, wide areanetworks (WANs), local area networks (LANs), wired networks, wirelessnetworks, or other suitable networks, etc., or any combination of two ormore such networks. For example, such networks may comprise satellitenetworks, cable networks, Ethernet networks, and other types ofnetworks.

The computing environment 201 may comprise, for example, a server 101(FIG. 1) computer or any other system providing computing capability.Alternatively, the computing environment 201 may employ a plurality ofcomputing devices that may be arranged, for example, in one or moreserver banks or computer banks or other arrangements. Such computingdevices may be located in a single installation or may be distributedamong many different geographical locations. For example, the computingenvironment 201 may include a plurality of computing devices thattogether may comprise a hosted computing resource, a grid computingresource and/or any other distributed computing arrangement. In somecases, the computing environment 201 may correspond to an elasticcomputing resource where the allotted capacity of processing, network,storage, or other computing-related resources may vary over time.

Various applications and/or other functionality may be executed in thecomputing environment 201 according to various embodiments. Also,various data is stored in a data store 211 that is accessible to thecomputing environment 201. The data store 211 may be representative of aplurality of data stores 211 as can be appreciated. The data stored inthe data store 211, for example, is associated with the operation of thevarious applications and/or functional entities as described below.

The components executed on the computing environment 201, for example,include a media distribution service 214 having a manifest generationservice 217, and other applications, services, processes, systems,engines, or functionality not discussed in detail herein. The mediadistribution service 214 is executed to facilitate the streaming of amedia item 219 to a client 104. To this end, the media distributionservice 214 serves as an origin of a content stream 221 of periodicallycommunicated content fragments 114 of the media item 219 to the client104. The media distribution service 214 may be configured to implementthe content stream 221 as an on demand stream of a media item 219, alive stream of a data feed, or by another approach. The manifestgeneration service 217 is configured to generate and communicatemanifests 117 for a currently streaming media item 219 to the client104. Manifests 117 may be pushed to a client 104, communicated inresponse to a request for a manifest 117 by the client 104, or otherwisecommunicated to the client 104.

The data stored in the data store 211 includes, for example, media items219, a purchase history 224, a viewing history 227, user profile data231 and potentially other data. Media items 219 include audio items,video items, audiovideo items, still images, and other media that may bestreamed to the client 104 via the media distribution service 214. Mediaitems 219 may be divided into segments 234, each segment 234corresponding to a portion of time of the media item 219. For a givensegment 234, a media item 219 may have multiple corresponding contentfragments 114. To this end, each of the content fragments 114 for aparticular segment 234 would embody the same portion of time of themedia item 219, but encoded according to different versions. Forexample, each the content fragments 114 for a particular segment 234 ofa media item 219 may be encoded into multiple versions, differing in bitrate, resolution, data size, encoding scheme, language, subtitle track,visual or audio components, or having other differences. The contentfragments 114 would be encoded to be aligned according to the segments234, such that each content fragment 114 at a given segment 234 wouldcorrespond to similar time codes, frames, or other portions of the mediaitem 219. This allows the media distribution service 214 to vary the bitrate, language, or other attribute of the content stream 221 whilemaintaining smooth playback by the client 104.

The purchase history 224 indicates media items 219 previously purchased,rented, downloaded, or otherwise obtained by a client 104 or inassociated with a user account. The purchase history 224 may alsoindicate items, products, or services purchased or otherwise acquiredvia an electronic commerce system. The viewing history 227 indicatesviewing or other behavioral data with respect to a consumption of amedia item 219. For example, a viewing history 227 may indicate rewind,fast-forward, chapter selection, chapter skipping, or other playbackmodifications performed in association with a consumption of a mediaitem 219 by a client 104. User profile data 231 indicates variousattributes of a defined user of the media distribution service 214,including location data, demographic data, playback preferences,censorship or content restriction preferences, or other data.

The client 104 is representative of a plurality of client devices thatmay be coupled to the network 107. The client 104 may comprise, forexample, a processor-based system such as a computer system. Such acomputer system may be embodied in the form of a desktop computer, alaptop computer, personal digital assistants, cellular telephones,smartphones, set-top boxes, music players, web pads, tablet computersystems, game consoles, electronic book readers, or other devices withlike capability. The client 104 may include a display 121. The display121 may comprise, for example, one or more devices such as liquidcrystal display (LCD) displays, gas plasma-based flat panel displays,organic light emitting diode (OLED) displays, electrophoretic ink (Eink) displays, LCD projectors, or other types of display devices, etc.The client 104 may further implement a buffer 237 into which contentfragments 114, subsets of content fragments 114, or other data of acontent stream 221 may be stored before rendering.

The client 104 may be configured to execute various applications such asa client application 241 and/or other applications. The clientapplication 241 may be executed in a client 104, for example, to accessnetwork content served up by the computing environment 201 and/or otherservers, thereby rendering a user interface on the display 121. To thisend, the client application 241 may comprise, for example, a browser, adedicated application, etc., and the user interface may comprise anetwork page, an application screen, etc. The client 104 may beconfigured to execute applications beyond the client application 241such as, for example, email applications, social networkingapplications, word processors, spreadsheets, and/or other applications.

Next, a general description of the operation of the various componentsof the networked environment 200 is provided. To begin, in someembodiments, a client 104 requests the media distribution service 214 tobegin an on demand content stream 221 of a media item 219. Instead ofcommunicating a single manifest 117 at the beginning of the on demandcontent stream 221 that indicates each of the available bit rates orother versions of a media item 219, the manifest generation service 217monitors the state of the client 104 and current network 107 conditions.The manifest generation service 217 then communicates an updatedmanifest 117 to the client 104 indicating a single URL directed to asequentially next content fragment 114 as determined by the manifestgeneration service 217, as will be discussed below. A sequentially nextcontent fragment 114 may include a content fragment 114 at a nextsegment 234 with respect to a last requested content fragment 114, withrespect to a last communicated content fragment 114, or with respect toanother content fragment 114.

To facilitate generating updated manifests 117 during the content stream221, the manifest generation service 217 may obtain, from the client104, buffer state data 244 indicating the state of a buffer 237 overtime. The buffer state data 244 may indicate, for example, a total sizeof the buffer 237. The buffer state data 244 may also indicate, at agiven time, an amount of data stored in the buffer 237, a duration ofcontent stored in the buffer 237, or other data. Accordingly, viewedover time, the buffer state data 244 may indicate a rate of change inthe amount of data stored in the buffer 237, a rate of change in theduration of content stored in the buffer 237, or other rates of change.

Additionally, as content fragments 114 are communicated to the client104, the manifest generation service 217 may aggregate a stream history247 indicating a bit rate, size, resolution, or other attribute of arespective content fragment 114 communicated to the client 104 at agiven time. The manifest generation service 217 may correlate the bufferstate data 244 and the stream history 247 to determine, at a given time,an effect on a buffer state data 244 when downloading a content fragment114.

To generate a manifest 117 during the content stream 221, the manifestgeneration service 217 may determine a source of a sequentially nextcontent fragment 114 of the content stream 221 for inclusion in themanifest 117. To do so, the manifest generation service 217 maycalculate an estimated bandwidth 251 for a communications channelbetween the client 104 and the media distribution service 214. In someembodiments, the estimated bandwidth 251 may comprise an estimate for adiscrete point in time. In other embodiments, the estimated bandwidth251 may include projected or predicted estimate of bandwidth at a futureinstance in time, or as a continual projection over time. In someembodiments, the manifest generation service 217 may be configured toobtain and aggregate estimated bandwidths 251 from the client 104. Inother embodiments, the manifest generation service 217 may access bufferstate data 244 and stream history 247 for a last communicated contentfragment 114 of the content stream 221. If the buffer state data 244indicates that an amount of data or a duration of content stored in thebuffer 237 increased, the manifest generation service 217 may determinethat the estimated bandwidth 251 is greater than a bit rate for the lastcommunicated content fragment 114. If the buffer state data 244indicates that the amount of data or duration of content in the buffer237 decreased, the manifest generation service 217 may determine thatthe estimated bandwidth 251 is less than the bit rate for the lastcommunicated content fragment 114. Additionally, in some embodiments,the manifest generation service 217 may determine that the estimatedbandwidth 251 is equal to the bit rate of the last communicated contentfragment 114 unless a rate of change indicated in the buffer state data244 meets or exceeds a predefined threshold.

Additionally, in some embodiments, the manifest generation service 217may determine the bit rate for the sequentially next content fragment114 according to an aggregate value, such as a running average, anexponential weighted average, or another aggregate value of a pluralityof data points. These data points may include, for example, the amountof data stored in the buffer 237, a duration of content stored in thebuffer 237, a rate of change of the amount of data or duration ofcontent stored in the buffer 237, or other data. The manifest generationservice 217 may then determine that the estimated bandwidth 251 as beinggreater or less than the bit rate of the last communicated contentfragment 114 according to an increase or decrease in the runningaverage.

As content fragments 114 for a sequentially next segment 234 may beencoded in multiple versions of known predefined bit rates, determiningthat the estimated bandwidth 251 as being less than or greater than thebit rate for the last communicated content fragment 114 may includedetermining the estimated bandwidth 251 as a next greatest or nextlesser bit rate in a range of bit rates. For example, a bit rate for alast communicated content fragment 114 may be 2.0 megabits per second(MBPS). A sequentially next segment 234 may include content fragments114 encoded at a range of bit rates of 1.0 MBPS, 1.5 MBPS, 2.0 MBPS, 2.5MBPS and 3.0 MBPS, or potentially other bit rates. Determining that theestimated bandwidth 251 is greater than the bit rate of the lastcommunicated content fragment 114 may then include determining theestimated bandwidth as 2.5 MBPS, the next greatest bit rate in therange. Conversely, determining that the estimated bandwidth 251 is lessthan the bit rate of the last communicated content fragment 114 may theninclude determining the estimated bandwidth as 1.5 MBPS, the next lesserbit rate in the range.

In some embodiments, the estimated bandwidth 251 may be calculated as anaggregate value of previously estimated bandwidths 251. The aggregatevalue may include a running average such as an exponential weightedaverage, or another value. For example, an estimated bandwidth 251 maybe calculated as described above, or by another approach. That estimatedbandwidth 251 is then modified by applying this value to the aggregatevalue.

In further embodiments, the manifest generation service 217 may beconfigured to calculate a confidence value 254 for the estimatedbandwidth 251. For example, in embodiments in which the estimatedbandwidth 251 is calculated according to a plurality of data points overtime, the confidence value 254 may be calculated as a standard deviationor other value of the data points, and potentially other data. Inembodiments in which the estimated bandwidth 251 is calculated as afunction of previously estimated bandwidths 251, the manifest generationservice 217 may calculate the confidence value 254 as a standarddeviation of the previously estimated bandwidths 251.

After calculating the confidence value 254, the manifest generationservice 217 may then modify the estimated bandwidth 251 according to theconfidence value 254. In some embodiments, the manifest generationservice 217 may scale or weigh the estimated bandwidth 251 by a factorbased on the confidence value 254. In other embodiments, the manifestgeneration service 217 may modify the estimated bandwidth 251 to agreater or lesser value included in the range of bit rates for thesequentially next content fragment 114. The estimated bandwidth 251 mayalso be modified according to a confidence value 254 by anotherapproach.

After calculating the estimated bandwidth 251 of the client 104, themanifest generation service 217 then selects a bit rate for thesequentially next content fragment 114. In embodiments in which theestimated bandwidth 251 matches a bit rate of a content fragment 114 atthe sequentially next segment 234, the manifest generation service 217may determine the bit rate as the estimated bandwidth 251. Inembodiments in which the estimated bandwidth 251 is an intermediaryvalue between bit rates in the range of predefined bit rates for thecontent fragment 114, the manifest generation service 217 may select thebit rate as a next lowest or next latest bit rate in the range. In otherembodiments, the manifest generation service 217 may select the bit rateas a value greater than the estimated bandwidth 251 responsive to anamount of data or duration of content in the buffer 237 meeting orexceeding a predefined threshold. The bit rate for the sequentially nextcontent fragment 114 may also be selected by another approach.

In some embodiments, the manifest generation service 217 may beconfigured to override the selected bit rate, thereby modifying theselected bit rate to a new value. For example, the manifest generationservice 217 may apply override rules 257 to the bit rate, the client104, or other data. If one or more override rules 257 are satisfied, themanifest generation service 217 may then modify the selected bit rate.

In some embodiments, an override rule 257 may define how a bit rate maybe selected for a particular device type of the client 104. For example,an override rule 257 may specify that a bit rate for a content stream221 to a particular client type cannot change by a delta meeting orexceeding a predefined threshold. In such an embodiment, the overriderule 257 may modify the bit rate for the sequentially next contentfragment 114 to reduce the delta to within the predefined threshold. Asanother example, an override rule 257 may prevent clients 104 fromrendering or downloading content at a particular bit rate, as clients104 of that particular device type may experience bugs or glitches atthe selected bit rate. Such an override rule 257 may then require thatthe selected bit rate be modified to a different value. Override rules257 may also be applied by another approach.

After selecting the bit rate, the manifest generation service 217 thendetermines which content fragment 114 will be referenced in the manifest117. In embodiments in which a single content fragment 114 for asequentially next segment 234 is encoded at the selected bit rate, themanifest generation service 217 determines that this content fragment114 will be referenced. In other embodiments, multiple content fragments114 corresponding to the sequentially next segment 234 may be encoded atthe selected bit rate, but differ according to other attributes. Forexample, content fragments 114 may include differing languages, censoredor uncensored content, advertisements, localized content, or otherdifferences. In such an embodiment, the manifest generation service 217may select the content fragment 114 to be referenced according to apurchase history 224, user profile data 231, or other attributes.

For example, a recommendation for an advertisement may be determinedfrom the purchase history 224 by any approach as can be appreciated. Acontent fragment 114 encoded at the selected bit rate and including thedetermined advertisement may then be selected for reference in themanifest 117. As another example, user profile data 231 may indicatecertain age restrictions, content restrictions, censorship preferences,or other preferences. A content fragment 114 encoded at the selected bitrate and conforming to these preferences may then be selected forreference in the manifest 117. As a further example, user profile data231 may indicate a region or other location attribute of a user. Acontent fragment 114 encoded at the selected bit rate and correspondingto regional content restrictions, content localizations, or otherwiseassociated with a location of the user may be selected for reference inthe manifest 117.

After selecting the content fragment 114 to be referenced in themanifest 117, the manifest generation service 217 then generates themanifest 117. This may include encoding a URL or other source identifierto which requests 261 may be directed to obtain the selected contentfragment 114. This may also include encoding metadata, such as a bitrate, language, encoding scheme, or other data in the manifest 117. Themanifest generation service 217 then communicates the manifest 117 tothe client 104. After obtaining the manifest 117, the client 104 thencommunicates a request 261 to the media distribution service 214according to the source identifier encoded in the manifest 117. Theprocess of maintaining the buffer state data 244 and stream history 247,calculating the estimated bandwidth 251, and generating andcommunicating the manifest 117 is repeated for subsequent contentfragments 114 in the content stream 221 until the content stream 221ends.

In other embodiments, the manifest generation service 217 may beconfigured to communicate a manifest 117 indicating multiple sourceidentifiers or URLs for content fragments 114 of a content stream 221.For example, the manifest generation service 217 may be configured tocommunicate a manifest 117 including URLs of sources for contentfragments 114 for the content stream 221 at the beginning of an ondemand content stream. As another example, the manifest generationservice 217 may be configured to repeatedly communicate manifests 117indicating many sources for content fragments 114 of multiple bit ratesto a client 104 during a live content stream 221. In these embodiments,a client application 241 facilitating the content stream 221 would needto select an appropriate source for requesting content fragments 114 ofthe content stream 221.

In embodiments in which a client application 241 is configured toselect, during the content stream 221, a source from which contentfragments 114 of a content stream 221 are requested, the client 104 maycalculate an estimated latency 264 between the client 104 and the mediadistribution service 214. This may include, for example, calculating anestimated latency 264 as a time interval between a time when a request261 for a previously downloaded or currently downloaded content fragment114 was sent and a time when the corresponding content fragment 114began downloading. This may also include calculating the estimatedlatency 264 as an aggregate value of multiple time intervals betweentimes when requests 261 were sent and when corresponding contentfragments 114 begin downloading. Such aggregate values may include arunning average such as an exponentially weighted average, or anothervalue.

The client application 241 may also be configured to calculate aconfidence value 254 for the estimated latency 264. This may becalculated as a standard deviation or other value calculated as afunction of multiple time intervals used to calculate an estimatedlatency 264, as a function of one or more previously calculatedestimated latencies 264, or as a function of other data. The clientapplication 241 may then modify the estimated latency 264 according tothe confidence value 254. For example, the estimated latency 264 may bescaled, weighted, or otherwise modified as a function of the confidencevalue 254. In other embodiments, the estimated latency 264 may beincreased or decreased responsive to the confidence value 254 fallingabove or below a predefined threshold. The estimated latency 264 mayalso be calculated according to a confidence value 254 by anotherapproach.

Selecting a bit rate for requesting content fragments 114 of a contentstream 221 may also include calculating a estimated bandwidth 251 by theclient application 241. In some embodiments, this includes calculatingthe estimated bandwidth 251 as a size of a last downloaded or previouslydownloaded content fragment 114 divided by a time to download therespective content fragment 114. This may also include calculating anaggregate value of multiple times to download respective contentfragments 114. For example, this may include calculating the size of alast downloaded or previously downloaded content fragment 114 divided bya time to download the respective content fragment 114 and applying thiscalculated value to a running average, exponentially weighted average,or other value. Other approaches may also be used to calculate theestimated bandwidth 251.

The client application 241 may also be configured to calculate aconfidence value 254 for the estimated bandwidth 251. This may becalculated as a standard deviation or other value calculated as afunction one or more previously calculated estimated bandwidths 251, oras a function of other data. The client application 241 may then modifythe estimated bandwidth 251 according to the confidence value 254. Forexample, the estimated bandwidth 251 may be scaled, weighted, orotherwise modified as a function of the confidence value 254. In otherembodiments, the estimated bandwidth 251 may be increased or decreasedresponsive to the confidence value 254 falling above or below apredefined threshold. The estimated bandwidth 251 may also be calculatedaccording to a confidence value 254 by another approach.

The client application 241 then selects a source identified in apreviously downloaded manifest 117 from which content fragments 114 willbe requested. In some embodiments, this may include calculating, foreach of the sources indicated in the manifest 117, a selection score267. The selection score 267 may be calculated according to a degree towhich one or more selection rules are satisfied by the respectivesources. The selection rules may be applied to the bit rates of therespective sources, the estimated latency 264, the estimated bandwidth251, an amount of data or a duration of content in a buffer 237, orother data. For example, given the estimated latency 264 and estimatedbandwidth 251, a selection rule may be satisfied if an estimated time tosend a request 261 to the respective source and completely download acontent fragment 114 from the respective source meets or exceeds apredefined time threshold.

The predefined time threshold may be defined as a function of a durationof content stored in the buffer 237. As a non-limiting example, thepredefined time threshold may be defined as twenty-five percent oranother value of the duration of content stored in the buffer 237. Thepredefined time threshold may also be defined as a function of aduration of content in a content fragment 114. As a non-limitingexample, the predefined time threshold may be defined as twice theduration of content in the sequentially next content fragment 114.

As another non-limiting example, given the estimated latency 264 andestimated bandwidth 251, a selection rule may be satisfied if a durationof content projected to be in the buffer 237 after downloading thesequentially next content fragment 114 meets or exceeds a predefinedthreshold. For example, the predefined threshold may be defined as tenseconds or another value of content stored in the buffer 237, or asanother duration. Selection rules may also be satisfied by anotherapproach.

After calculating selection scores 267 for each of the sources indicatedin a manifest 117, the client application 241 selects a source fromwhich a sequentially next content fragment 114 will be requested. Thismay include selecting a source having a highest quality level from asubset of sources whose selection scores 267 meet or exceed a predefinedthreshold. The quality level may be defined as a bit rate, a resolution,or as a function of other attributes. Selecting the source may also bedetermined according to language settings, location information, theapplication of override rules 257, or by other approaches as wasdescribed above with respect to the manifest generation service 217.

In some embodiments, the client application 241 may also determine whento send a request 261, hereinafter known as a request time 271, suchthat the requested content fragment 114 begins downloading as close tothe completion of a download of a currently downloading content fragment114. This prevents the request 261 from being sent too early, therebypotentially resulting in multiple content fragments 114 being downloadedsimultaneously, thereby using more bandwidth. This also prevents therequest 261 from being sent too late, thereby potentially resulting inavoidable buffer 237 usage.

To calculate the request time 271, the client application 241 calculatesa projected time to complete the download of a currently downloadingcontent fragment 114. This may be performed by determining an amount ofthe content fragment 114 left to be downloaded by subtracting an amountdownloaded from a size of the content fragment 114 as indicated in amanifest 117 or determined by another approach. The amount left to bedownloaded is then divided by the estimated bandwidth 251 to determine aprojected time to complete the download. The estimated latency 264 isthen added or subtracted from the projected time to complete thedownload in order to determine the request time 271.

In some embodiments, the request time 271 may be modified according to aconfidence value 254 for the estimated bandwidth 251, the estimatedlatency 264, or by another approach. For example, the request time 271may be weighted, scaled, or modified as a function of a confidence value254. As another example, the request time 271 may be modified by apredefined amount of time responsive to a confidence value 254 fallingbelow a predefined threshold. The request time 271 may also be reducedor modified by a predefined offset value to reduce the likelihood of arequest 261 being sent too late. The request time 271 may also bemodified by another approach.

The client application 241 then communicates a request 261 to theselected source at the request time 271. The determination of a sourcein a manifest 117, determination of a request time 271 andcommunications of requests 261 is repeated until the content stream 221concludes.

Although the discussion presented herein describes the communication ofa manifest 117 to a client 104 indicating the source of content portions114, it is understood that an indication of a source of content portions114 may also be included in other data, or by another approach.

Referring next to FIG. 3, shown is a flowchart that provides one exampleof the operation of a portion of the media distribution service 214implementing a manifest generation service 217 (FIG. 2) according tovarious embodiments. It is understood that the flowchart of FIG. 3provides merely an example of the many different types of functionalarrangements that may be employed to implement the operation of theportion of the media distribution service 214 as described herein. As analternative, the flowchart of FIG. 3 may be viewed as depicting anexample of elements of a method implemented in the computing environment201 (FIG. 2) according to one or more embodiments.

Beginning with box 301, the media distribution service 214 begins an ondemand content stream 221 (FIG. 2) of a media item 219 (FIG. 2) to aclient 104 (FIG. 1). During the content stream 221, in box 302, themanifest generation service 217 obtains buffer state data 244 (FIG. 2)from the client 104. The buffer state data 244 may indicate, forexample, an amount of data stored in a buffer 237 (FIG. 2) of a client104, a duration of content stored in the buffer 237, a size of thebuffer 237, a rate of change of an amount of stored data or duration ofstored content, or other data.

Next, in box 304, the manifest generation service 217 determines asource from which the client 104 should request a sequentially nextcontent fragment 114, as will be described in more detail below withreference to FIG. 4. The manifest generation service 217 then generatesa manifest 117 (FIG. 1) indicating the determined source of contentfragments 114. This may include, for example, encoding a UniformResource Locator (URL), network address, or other source identifier in amanifest 117. This may also include encoding associated metadata,including bit rate data, language data, content rating data, encodingscheme data, or other data in the manifest. The manifest generationservice 217 then communicates the manifest 117 to the client in box 311.

The stream history 247 (FIG. 2) is then updated to reflect the bit rateor other attributes corresponding to the source indicated in themanifest 117 in box 313. In box 314, the media distribution service 214determines if the content stream 221 has ended. If the content stream221 has not ended, the process returns to box 302, where the manifestgeneration service 217 continues to generate updated manifests 117 forcommunication to the client 104. Otherwise, the process ends.

Turning now to FIG. 4, shown is a flowchart that provides one example ofthe operation of a portion of the manifest generation service 217 (FIG.2) as was discussed above with respect to box 304 of FIG. 3 according tovarious embodiments. It is understood that the flowchart of FIG. 4provides merely an example of the many different types of functionalarrangements that may be employed to implement the operation of theportion of the manifest generation service 217 as described herein. Asan alternative, the flowchart of FIG. 4 may be viewed as depicting anexample of elements of a method implemented in the computing environment201 (FIG. 2) according to one or more embodiments.

Beginning with box 401, the manifest generation service 217 calculatesan estimated bandwidth 251 (FIG. 2) for the client 104 (FIG. 1) usingbuffer state data 244 (FIG. 2), stream history 247 (FIG. 2), andpotentially other data. In some embodiments, this may includedetermining the buffer state data 244 indicates that an amount of dataor a duration of content stored in the buffer 237 (FIG. 2) increased ordecreased during or after a download of a last communicated contentfragment 114 (FIG. 1). An increase may indicate that the estimatedbandwidth 251 is greater than a bit rate for the last communicatedcontent fragment 114. A decrease may indicate that the estimatedbandwidth 251 is less than the bit rate for the last communicatedcontent fragment 114. Additionally, in some embodiments, the manifestgeneration service 217 may determine that the estimated bandwidth 251 isequal to the bit rate of the last communicated content fragment 114unless a rate of change indicated in the buffer state data 244 meets orexceeds a predefined threshold.

Additionally, in some embodiments, the manifest generation service 217may calculate the estimated bandwidth 251 according to a runningaverage, such as an exponential weighted average, or another aggregatevalue of a plurality of data points. These data points may include, forexample, the amount of data stored in the buffer 237, a duration ofcontent stored in the buffer 237, a rate of change of the amount of dataor duration of content stored in the buffer 237, or other data. Themanifest generation service 217 may then determine that the estimatedbandwidth 251 as being greater or less than the bit rate of the lastcommunicated content fragment 114 according to an increase or decreasein the running average.

In other embodiments, the manifest generation service 217 may beconfigured to maintain two running averages of the data points accordingto differing criteria. For example, a first exponential weighted averagemay be weighted by a first constant, while a second running average maybe weighted by a second constant greater than the first constant.According to these approaches, a single data point may perturb thesecond running average to lesser degree than the first. The first andsecond exponential weighted averages may also be calculated according todiffering data sets. For example, the first exponential weighted averagemay be calculated according to the last N values in a time series, whilethe second exponential weighted average may be calculated according to alast M values in the time series, with M being greater than M. Again, bycalculating the second exponential weighted average using a greaternumber of data points in a time series, a single data point perturbs thesecond exponential weighted average to a lesser degree.

The manifest generation service 217 may then track trend lines of thefirst and second exponential weighted averages. The manifest generationservice 217 may then determine that the estimated bandwidth 251 isgreater or less than the bit rate of the last communicated contentfragment 114 when the trend lines cross, i.e. when the first exponentialweighted average transitions from being greater than the secondexponential weighted average to being less than the second exponentialweighted average, or when the first exponential weighted averagetransitions from being less than the second exponential weighted averageto being greater than the second exponential weighted average.

For example, when the trend lines of the first and second exponentialweighted averages cross and the first and second exponential weightedaverages are increasing, the manifest generation service 217 maydetermine that the bit rate of the content stream 221 (FIG. 2) should beincreased, i.e. that the estimated bandwidth 251 is greater than the bitrate of the last communicated content fragment 114. As another example,when the trend lines of the first and second exponential weightedaverages cross and the first and second exponential weighted averagesare decreasing, the manifest generation service 217 may determine thatthe bit rate of the content stream 221 should be decreased, i.e. thatthe estimated bandwidth 251 is less than the bit rate of the lastcommunicated content fragment 114.

As the sequentially next content fragment 114 may be encoded in multipleversions of known predefined bit rates, determining that the estimatedbandwidth 251 as being less than or greater than the bit rate for thelast communicated content fragment 114 may include determining theestimated bandwidth 251 as a next greatest or next lesser bit rate in arange of bit rates. In some embodiments, the estimated bandwidth 251 maybe calculated as a running average of previously estimated bandwidths251. The running average may include an exponential weighted average, oranother running average. For example, an estimated bandwidth 251 may becalculated as described above, or by another approach. That estimatedbandwidth 251 is then modified by applying this value to the runningaverage.

Next, in box 407, the manifest generation service 217 calculates aconfidence value 254 (FIG. 2) for the estimated bandwidth 251.Generally, a confidence value 254 is a numerical representation ofconfidence in an estimate. The confidence value 254 may be used tofurther modify, refine, or otherwise change the estimate to reflect thedegree of confidence. For example, in embodiments in which the estimatedbandwidth 251 is calculated according to a plurality of data points overtime, the confidence value 254 may be calculated as a standard deviationor other value of the data points, and potentially other data. Inembodiments in which the estimated bandwidth 251 is calculated as afunction of previously estimated bandwidths 251, the manifest generationservice 217 may calculate the confidence value 254 as a standarddeviation of the previously estimated bandwidths 251.

After calculating the confidence value 254, the manifest generationservice 217 may then determines if the confidence value 254 falls belowa predefined threshold in box 411. If so, the process advances to box414 where the estimated bandwidth 251 is modified. In some embodiments,the manifest generation service 217 may scale or weigh the estimatedbandwidth 251 by a factor based on the confidence value 254. In otherembodiments, the manifest generation service 217 may modify theestimated bandwidth 251 to a greater or lesser value included in therange of bit rates for the sequentially next content fragment 114. Theestimated bandwidth 251 may also be modified by another approach. Theprocess then advances to box 417.

If the confidence value 254 meets or exceeds the predefined threshold asdetermined in box 411, the process instead advances to box 416 where asequentially next content fragment 114 is selected according to theestimated bandwidth 251. This may include, for example, selecting a bitrate of a content fragment 114 matching the estimated bandwidth 251, abit rate of a content fragment 114 within a predefined delta of theestimated bandwidth 251, a bit rate of a content fragment 114 having ahighest bit rate below the estimated bandwidth 251, or by anotherapproach.

Next, in box 417, the manifest generation service 217 determines if anyoverride rules 257 (FIG. 2) are satisfied. Override rules 257 may besatisfied according to an estimated bandwidth 251, a device type for aclient 104, a selected bit rate for a source as determined in box 416,or according to other data. If the override rules 257 are satisfied, themanifest generation service 217 may then modify the selected bit rate.

In some embodiments, an override rule 257 may define how a bit rate maybe selected for a particular device type of the client 104. For example,an override rule 257 may specify that a bit rate for a content stream221 to a particular client type cannot change by a delta meeting orexceeding a predefined threshold. In such an embodiment, the overriderule 257 may modify the bit rate for the sequentially next contentfragment 114 to reduce the delta to within the predefined threshold. Asanother example, an override rule 257 may indicate that clients 104 of aparticular device type experience bugs or glitches when renderingcontent fragments 114 at the selected bit rate. Such an override rule257 may then require that the selected bit rate be modified to adifferent value.

As an additional example, an override rule 257 may restrict theselection of a particular bit rate for content fragments 114 encodedusing a particular codec or encoding scheme. Override rules 257 may alsoindicate, for a particular device type, a maximum resolution, framerate, or other parameter of the rendering capabilities of a device. If aselected bit rate exceeds a limitation of these parameters, the overriderule 257 may require that the bit rate be modified to be within theselimitations. For example, device type may have a maximum renderingcapability of 720p video. A selected bit rate may correspond to acontent fragment 114 encoded at 1080p, or another resolution greaterthan the maximum rendering capability of the client 104. The overriderule 257 may indicate that the bit rate should be lowered to a contentfragment 114 within the maximum rendering capability of the client 104.

As a further example, an override rule 257 may redefine a sequentiallynext content fragment 114 to be sent to a client 104 if a contentfragment 114 is corrupted or otherwise in violation of a validation orverification policy. For example, in some embodiments, a contentfragment 114 previously communicated to a client 104 may be corrupted.The client 104 may communicate an indication or notification of thecorruption to the manifest generation service 217. In response to thisnotification, the manifest generation service 217 may select a differentcontent fragment 114 for the same segment 234 as the corrupted contentfragment 114, and select that fragment 114 for reference in the manifest117. In other embodiments, a particular content fragment 114 may beknown to be corrupted. If the manifest generation service 117 determinesthat a source for the corrupted content fragment 114 is to be includedin the manifest, the override rule 257 may require the selection of adifferent content fragment 114 from the same segment 234 as thecorrupted content fragment 114. Override rules 257 may also be appliedby another approach.

If no override rules 257 are satisfied, the process advances directly tobox 424. Otherwise, if an override rule 257 is satisfied, the processadvances to block 421 where the selected content fragment 114 isreselected according to the override rules 257. This may include, forexample, selecting a content fragment 114 of a different bit rateaccording to various approaches. For example, in some embodiments, theoverride rule 257 may specify that if the override rule 257 issatisfied, the bit rate should be incremented or decremented until theoverride rule 257 is satisfied. In other embodiments, the override rule257 may define a default bit rate to which the bit rate will bemodified. The override rules 257 may also be applied by anotherapproach. After reselecting the content fragment 114, the processadvances to box 424.

In box 424, the manifest generation service 217 determines a source forcontent fragments 114 to be encoded in a manifest 117. A source isconsidered a network address, identifier, Uniform Resource Locator(URL), application program interface (API) call, or other dataaccessible to a client 104 from which content fragments 114 may berequested. Determining a source for content fragments 114 may includeselecting a URL or identifier corresponding to content fragments 114 ofthe selected bit rate. In embodiments in which multiple sources areavailable for content fragments 114 of the selected bit rate, themanifest generation service 217 may select the source according to otherdata, including a purchase history 224 (FIG. 2), user profile data 231(FIG. 2), or other data. After selecting the source of content fragments114, the process ends.

Turning now to FIG. 5, shown is a flowchart that provides one example ofthe operation of a portion of the client application 241 according tovarious embodiments. It is understood that the flowchart of FIG. 5provides merely an example of the many different types of functionalarrangements that may be employed to implement the operation of theportion of the client application 241 as described herein. As analternative, the flowchart of FIG. 5 may be viewed as depicting anexample of elements of a method implemented in the client 104 (FIG. 1)according to one or more embodiments.

Beginning with box 501, the client application 241 calculates anestimated latency 264 (FIG. 2) between the client 104 and the mediadistribution service 214 (FIG. 2). This may include, for example,calculating an estimated latency 264 as a time interval between a timewhen a request 261 (FIG. 2) for a previously downloaded or currentlydownloaded content fragment 114 (FIG. 1) was sent and a time when thecorresponding content fragment 114 began downloading. This may alsoinclude calculating the estimated latency 264 as an aggregate value ofmultiple time intervals between times when requests 261 were sent andwhen corresponding content fragments 114 begin downloading. Suchaggregate values may include a running average, which may be calculatedas an average of the last N previous data points. Such aggregate valuesmay also include an exponentially weighted average. An exponentiallyweighted average may be calculated by multiplying a last calculatedexponentially weighted average by a constant. The next data point isthen added to that value, and the total is divided by the constant plusone. The aggregate value may also include other values.

Calculating the estimated latency 264 may also include calculating aconfidence value 254 (FIG. 2) for the estimated latency 264, asmentioned above. The confidence value 254 is a quantitative evaluationof the confidence in estimating the latency. The confidence value 254may then be used to adjust, refine, or otherwise modify the estimatedlatency 264. The confidence value 254 may be calculated as a standarddeviation or other value calculated as a function of multiple timeintervals used to calculate an estimated latency 264, as a function ofone or more previously calculated estimated latencies 264, or as afunction of other data. Thus, if a series of data points used tocalculate an estimated latency 264 has a high standard deviation, theresulting confidence value 254 would be lowered. If the standarddeviation is low, indicating a low variance in the values used tocalculate the estimated latency 264, this may result in a greaterconfidence value 254.

The client application 241 may then modify the estimated latency 264according to the confidence value 254. For example, the estimatedlatency 264 may be scaled, weighted, or otherwise modified as a functionof the confidence value 254. As a non-limiting example, if theconfidence value 254 is embodied as a fraction or percentile value, theestimated latency 264 may be modified by multiplying it by theconfidence value 254. In other embodiments, the estimated latency 264may be increased or decreased responsive to the confidence value 254falling above or below a predefined threshold. For example, if theconfidence value 254 falls below a threshold, the estimated latency 264may be decremented or scaled by a predefined value, as it may bepreferable to underestimate latency as opposed to overestimate latency.The estimated latency 264 may also be calculated or modified accordingto a confidence value 254 by another approach.

Next, in box 504, the client application 241 calculates an estimatedbandwidth 251 of the client 104. In some embodiments, this includescalculating the estimated bandwidth 251 as a size of a last downloadedor previously downloaded content fragment 114 divided by a time todownload the respective content fragment 114. This may also includecalculating an aggregate value of multiple times to download respectivecontent fragments 114. For example, this may include calculating thesize of a last downloaded or previously downloaded content fragment 114divided by a time to download the respective content fragment 114 andapplying this calculated value to a running average, exponentiallyweighted average, or other value. Other approaches may also be used tocalculate the estimated bandwidth 251.

Calculating the estimated bandwidth 251 for a client 104 may alsoinclude calculating a confidence value 254 for the estimated bandwidth251, indicating a quantitative estimate in the confidence in theestimate of bandwidth. This may be calculated as a standard deviation orother value calculated as a function one or more previously calculatedestimated bandwidths 251, or as a function of other data. Thus, if aseries of data points used to calculate an estimated bandwidth 251 has ahigh standard deviation, the resulting confidence value 254 would belowered. If the standard deviation is low, indicating a low variance inthe values used to calculate the estimated bandwidth 251, this mayresult in a greater confidence value 254. The client application 241 maythen modify the estimated bandwidth 251 according to the confidencevalue 254. For example, the estimated bandwidth 251 may be scaled,weighted, or otherwise modified as a function of the confidence value254. As a non-limiting example, if the confidence value 254 is embodiedas a fraction or percentile value, the estimated bandwidth 251 may bemodified by multiplying it by the confidence value 254. In otherembodiments, the estimated bandwidth 251 may be increased or decreasedresponsive to the confidence value 254 falling above or below apredefined threshold. For example, if the confidence value 254 fallsbelow a threshold, the estimated bandwidth 251 may be decremented orscaled by a predefined value, as it may be preferable to underestimatebandwidth as opposed to overestimate bandwidth. As another example, ifthe confidence value 254 for the estimated bandwidth 251 falls below apredefined threshold, the estimated bandwidth 251 may be redefined to abit rate in a range of bit rates for content fragments 114. For example,the estimated bandwidth 251 may be lowered to a highest bit rate in therange that is less than the current estimated bandwidth 251. Theestimated bandwidth 251 may also be calculated or modified according toa confidence value 254 by another approach

After calculating the estimated latency 264 and estimated bandwidth 251,in box 507, the client application 241 calculates a request time 271defining when a request 161 for a sequentially next content fragment 114will be sent to the media distribution service 214. This may include,for example, calculating a projected time to complete a download of acurrently downloading content fragment 114. This may be performed bydetermining an amount of the content fragment 114 left to be downloadedby subtracting an amount downloaded from a size of the content fragment114 as indicated in a manifest 117 (FIG. 1) or determined by anotherapproach. The amount left to be downloaded is then divided by theestimated bandwidth 251 to determine a projected time to complete thedownload. The estimated latency 264 is then added or subtracted from theprojected time to complete the download in order to determine therequest time 271.

In some embodiments, the request time 271 may be modified according to aconfidence value 254 for the estimated bandwidth 251, a confidence value254 for the estimated latency 264, or by another approach. For example,the request time 271 may be weighted, scaled, or modified as a functionof a confidence value 254. As another example, the request time 271 maybe modified by a predefined amount of time responsive to a confidencevalue 254 falling below a predefined threshold. The request time 271 mayalso be modified by another approach.

Next, in box 511, the client application 241 calculates, for each of thesources indicated in a manifest 117, a selection score 267 (FIG. 2). Theselection score 267 may be calculated according to a degree to which oneor more selection rules are satisfied by the respective sources.Selection rules define one or more criteria or attributes associatedwith the client 104, content stream 221, content fragments 114, or otherdata that, if met, result in the satisfaction of the selection rule. Theselection rules may be applied to the bit rates of the respectivesources, the estimated latency 264, the estimated bandwidth 251, anamount of data or a duration of content in a buffer 237 (FIG. 2), orother data. For example, given the estimated latency 264 and estimatedbandwidth 251, a selection rule may be satisfied if an estimated time tosend a request 261 to the respective source and completely download acontent fragment 114 from the respective source meets or exceeds apredefined time threshold.

The predefined time threshold may be defined as a function of a durationof content stored in the buffer 237. As a non-limiting example, thepredefined time threshold may be defined as twenty-five percent of theduration of content stored in the buffer 237. The predefined timethreshold may also be defined as a function of a duration of content ina content fragment 114. As a non-limiting example, the predefined timethreshold may be defined as twice the duration of content in thesequentially next content fragment 114.

As another non-limiting example, given the estimated latency 264 andestimated bandwidth 251, a selection rule may be satisfied if a durationof content projected to be in the buffer 237 after downloading thesequentially next content fragment 114 meets or exceeds a predefinedthreshold. For example, the predefined threshold may be defined as tenseconds of content stored in the buffer 237, or as another duration.Selection rules may also define other criteria or attributes that, ifsatisfied, positively contribute to a selection score 267.

After calculating selection scores 267 for each of the sources indicatedin a manifest 117, the client application 241 selects a source fromwhich a sequentially next content fragment 114 will be requested in box514. This may include selecting a source having a highest quality levelfrom a subset of sources whose selection scores 267 meet or exceed apredefined threshold. The quality level may be defined as a bit rate, aresolution, or as a function of other attributes. Selecting the sourcemay also be determined according to language settings, locationinformation, the application of override rules 257 (FIG. 2), or by otherapproaches as was described above with respect to the manifestgeneration service 217. In box 517, the client application 241 thencommunicates a request 261 to the selected source at the request time271, after which the process ends.

With reference to FIG. 6, shown is a schematic block diagram of thecomputing environment 201 according to an embodiment of the presentdisclosure. The computing environment 201 includes one or more computingdevices 601. Each computing device 601 includes at least one processorcircuit, for example, having a processor 602 and a memory 604, both ofwhich are coupled to a local interface 607. To this end, each computingdevice 601 may comprise, for example, at least one server computer orlike device. The local interface 607 may comprise, for example, a databus with an accompanying address/control bus or other bus structure ascan be appreciated.

Stored in the memory 604 are both data and several components that areexecutable by the processor 602. In particular, stored in the memory 604and executable by the processor 602 are a media distribution service 214having a manifest generation service 217, and potentially otherapplications. Also stored in the memory 604 may be a data store 211 andother data. In addition, an operating system may be stored in the memory604, the operating system being executable by the processor 602.

With reference to FIG. 7, shown is a schematic block diagram of theclient 104 according to an embodiment of the present disclosure. Theclient 104 includes at least one processor circuit, for example, havinga processor 702 and a memory 704, both of which are coupled to a localinterface 707. To this end, the client 104 may comprise, for example, atleast one computer or like device. The local interface 707 may comprise,for example, a data bus with an accompanying address/control bus orother bus structure as can be appreciated.

Stored in the memory 704 are both data and several components that areexecutable by the processor 702. In particular, stored in the memory 704and executable by the processor 702 are a client application 241. Alsostored in the memory 704 may be a buffer 237 and other data. Inaddition, an operating system may be stored in the memory 704, theoperating system being executable by the processor 702.

It is understood that there may be other applications that are stored inthe memory 604 or 704 and are executable by the processor 602 or 702 ascan be appreciated. Where any component discussed herein is implementedin the form of software, any one of a number of programming languagesmay be employed such as, for example, C, C++, C#, Objective C, Java®,JavaScript®, Perl, PHP, Visual Basic®, Python®, Ruby, Flash®, or otherprogramming languages.

A number of software components are stored in the memory 604 or 704 andare executable by the processor 602 or 702. In this respect, the term“executable” means a program file that is in a form that can ultimatelybe run by the processor 602 or 702. Examples of executable programs maybe, for example, a compiled program that can be translated into machinecode in a format that can be loaded into a random access portion of thememory 604 or 704 and run by the processor 602 or 702, source code thatmay be expressed in proper format such as object code that is capable ofbeing loaded into a random access portion of the memory 604 or 704 andexecuted by the processor 602 or 702, or source code that may beinterpreted by another executable program to generate instructions in arandom access portion of the memory 604 or 704 to be executed by theprocessor 602 or 702, etc. An executable program may be stored in anyportion or component of the memory 604 or 704 including, for example,random access memory (RAM), read-only memory (ROM), hard drive,solid-state drive, USB flash drive, memory card, optical disc such ascompact disc (CD) or digital versatile disc (DVD), floppy disk, magnetictape, or other memory components.

The memory 604 or 704 is defined herein as including both volatile andnonvolatile memory and data storage components. Volatile components arethose that do not retain data values upon loss of power. Nonvolatilecomponents are those that retain data upon a loss of power. Thus, thememory 604 or 704 may comprise, for example, random access memory (RAM),read-only memory (ROM), hard disk drives, solid-state drives, USB flashdrives, memory cards accessed via a memory card reader, floppy disksaccessed via an associated floppy disk drive, optical discs accessed viaan optical disc drive, magnetic tapes accessed via an appropriate tapedrive, and/or other memory components, or a combination of any two ormore of these memory components. In addition, the RAM may comprise, forexample, static random access memory (SRAM), dynamic random accessmemory (DRAM), or magnetic random access memory (MRAM) and other suchdevices. The ROM may comprise, for example, a programmable read-onlymemory (PROM), an erasable programmable read-only memory (EPROM), anelectrically erasable programmable read-only memory (EEPROM), or otherlike memory device.

Also, the processor 602 or 702 may represent multiple processors 602 or702 and/or multiple processor cores and the memory 604 or 704 mayrepresent multiple memories 604 or 704 that operate in parallelprocessing circuits, respectively. In such a case, the local interface607 or 707 may be an appropriate network that facilitates communicationbetween any two of the multiple processors 602 or 702, between anyprocessor 602 or 702 and any of the memories 604 or 704, or between anytwo of the memories 604 or 704, etc. The local interface 607 or 707 maycomprise additional systems designed to coordinate this communication,including, for example, performing load balancing. The processor 602 or702 may be of electrical or of some other available construction.

Although the manifest generation service 217, client application 241,and other various systems described herein may be embodied in softwareor code executed by general purpose hardware as discussed above, as analternative the same may also be embodied in dedicated hardware or acombination of software/general purpose hardware and dedicated hardware.If embodied in dedicated hardware, each can be implemented as a circuitor state machine that employs any one of or a combination of a number oftechnologies. These technologies may include, but are not limited to,discrete logic circuits having logic gates for implementing variouslogic functions upon an application of one or more data signals,application specific integrated circuits (ASICs) having appropriatelogic gates, field-programmable gate arrays (FPGAs), or othercomponents, etc. Such technologies are generally well known by thoseskilled in the art and, consequently, are not described in detailherein.

The flowcharts of FIGS. 3, 4 and 5 show the functionality and operationof an implementation of portions of the manifest generation service 217or client application 241, respectively. If embodied in software, eachblock may represent a module, segment, or portion of code that comprisesprogram instructions to implement the specified logical function(s). Theprogram instructions may be embodied in the form of source code thatcomprises human-readable statements written in a programming language ormachine code that comprises numerical instructions recognizable by asuitable execution system such as a processor 602 or 702 in a computersystem or other system. The machine code may be converted from thesource code, etc. If embodied in hardware, each block may represent acircuit or a number of interconnected circuits to implement thespecified logical function(s).

Although the flowcharts of FIGS. 3, 4 and 5 show a specific order ofexecution, it is understood that the order of execution may differ fromthat which is depicted. For example, the order of execution of two ormore blocks may be scrambled relative to the order shown. Also, two ormore blocks shown in succession in FIGS. 3, 4 and 5 may be executedconcurrently or with partial concurrence. Further, in some embodiments,one or more of the blocks shown in FIGS. 3, 4 and 5 may be skipped oromitted. In addition, any number of counters, state variables, warningsemaphores, or messages might be added to the logical flow describedherein, for purposes of enhanced utility, accounting, performancemeasurement, or providing troubleshooting aids, etc. It is understoodthat all such variations are within the scope of the present disclosure.

Also, any logic or application described herein, including a manifestgeneration service 217 or client application 241, that comprisessoftware or code can be embodied in any non-transitory computer-readablemedium for use by or in connection with an instruction execution systemsuch as, for example, a processor 602 or 702 in a computer system orother system. In this sense, the logic may comprise, for example,statements including instructions and declarations that can be fetchedfrom the computer-readable medium and executed by the instructionexecution system. In the context of the present disclosure, a“computer-readable medium” can be any medium that can contain, store, ormaintain the logic or application described herein for use by or inconnection with the instruction execution system.

The computer-readable medium can comprise any one of many physical mediasuch as, for example, magnetic, optical, or semiconductor media. Morespecific examples of a suitable computer-readable medium would include,but are not limited to, magnetic tapes, magnetic floppy diskettes,magnetic hard drives, memory cards, solid-state drives, USB flashdrives, or optical discs. Also, the computer-readable medium may be arandom access memory (RAM) including, for example, static random accessmemory (SRAM) and dynamic random access memory (DRAM), or magneticrandom access memory (MRAM). In addition, the computer-readable mediummay be a read-only memory (ROM), a programmable read-only memory (PROM),an erasable programmable read-only memory (EPROM), an electricallyerasable programmable read-only memory (EEPROM), or other type of memorydevice.

Further, any logic or application described herein, including a manifestgeneration service 217 or client application 241, may be implemented andstructured in a variety of ways. For example, one or more applicationsdescribed may be implemented as modules or components of a singleapplication. Further, one or more applications described herein may beexecuted in shared or separate computing devices or a combinationthereof. For example, a plurality of the applications described hereinmay execute in the same computing device 601 or client 104, or inmultiple computing devices in the same computing environment 201.Additionally, it is understood that terms such as “application,”“service,” “system,” “engine,” “module,” and so on may beinterchangeable and are not intended to be limiting.

Disjunctive language such as the phrase “at least one of X, Y, or Z,”unless specifically stated otherwise, is otherwise understood with thecontext as used in general to present that an item, term, etc., may beeither X, Y, or Z, or any combination thereof (e.g., X, Y, and/or Z).Thus, such disjunctive language is not generally intended to, and shouldnot, imply that certain embodiments require at least one of X, at leastone of Y, or at least one of Z to each be present.

It should be emphasized that the above-described embodiments of thepresent disclosure are merely possible examples of implementations setforth for a clear understanding of the principles of the disclosure.Many variations and modifications may be made to the above-describedembodiment(s) without departing substantially from the spirit andprinciples of the disclosure. All such modifications and variations areintended to be included herein within the scope of this disclosure andprotected by the following claims.

Therefore, the following is claimed:
 1. A non-transitorycomputer-readable medium embodying a program that, when executed in atleast one computing device, causes the at least one computing device toat least: determine at least one time interval associated with a clientapplication obtaining a content fragment from a media distributionservice; calculate an estimated latency to the media distributionservice, based at least on the at least one time interval; determine atime to request a subsequent fragment of a media item based at least inpart on the estimated latency; calculate a respective selection scorefor each of a plurality of sources for a stream of the media item;select one of the plurality of sources based at least in part on therespective selection scores; and send a request, to the one of theplurality of sources, for the subsequent fragment at the time torequest.
 2. The non-transitory computer-readable medium of claim 1,wherein the program further causes the at least one computing device toat least: calculate a confidence value for the estimated latency; andmodify the estimated latency based at least in part on the confidencevalue.
 3. The non-transitory computer-readable medium of claim 2,wherein calculating the confidence value comprises calculating astandard deviation as a function of at least one of a plurality of timeintervals used to calculate the estimated latency or a plurality ofpreviously calculated estimated latencies.
 4. The non-transitorycomputer-readable medium of claim 1, wherein the time interval isbetween a first time when a previous request for a prior contentfragment was sent and a second time when the prior content fragmentbegan downloading.
 5. The non-transitory computer-readable medium ofclaim 4, wherein the program further causes the at least one computingdevice to at least: determine a second time interval between a thirdtime when a second previous request for a second prior content fragmentwas sent and a fourth time when the second prior content fragment begandownloading; and calculate an aggregate interval value by determining arunning average of at least the time interval and the second timeinterval, wherein the estimated latency is calculated based at least inpart on the aggregate interval value.
 6. The non-transitorycomputer-readable medium of claim 4, wherein the running averagecomprises an exponentially weighted average.
 7. The non-transitorycomputer-readable medium of claim 1, wherein the program further causesthe at least one computing device to at least calculate an estimatedbandwidth corresponding to a network connection of the at least onecomputing device, wherein the time to request the subsequent fragment ofthe media item is further based at least in part on the estimatedbandwidth.
 8. A system, comprising: a memory; and at least one computingdevice in communication with the memory, the at least one computingdevice being configured to at least: determine at least one timeinterval associated with a client application obtaining a contentfragment from a media distribution service; calculate an estimatedlatency to the media distribution service, based at least on the atleast one time interval; calculate an estimated bandwidth correspondingto a network connection of the at least one computing device; determinea time to request a subsequent fragment of a media item based at leastin part on the estimated latency and the estimated bandwidth; and send arequest for the subsequent fragment at the time to request.
 9. Thesystem of claim 8, wherein the media item is divided into a plurality ofsegments, each of the plurality of segments being embodied as arespective plurality of content fragments and the subsequent fragmentcorresponds to one of the respective plurality of content fragmentscorresponding to one of the plurality of segments.
 10. The system ofclaim 8, wherein the at least one computing device is further configuredto at least determine a time to download a previous content fragment anda size of the previous content fragment, wherein the estimated bandwidthis based at least in part on the time to download the previous contentfragment and the size of the previous content fragment.
 11. The systemof claim 8, wherein the at least one computing device is furtherconfigured to at least: calculate a confidence value for the estimatedbandwidth; and modify the estimated bandwidth based at least in part onthe confidence value.
 12. The system of claim 11, wherein calculatingthe confidence value comprises calculating a standard deviation as afunction of a plurality of previously calculated estimated bandwidths.13. The system of claim 11, wherein the at least one computing device isfurther configured to at least determine that the confidence value fallsbelow a threshold value, wherein modifying the estimated bandwidthcomprises reducing the estimated bandwidth responsive to the confidencevalue failing below the threshold value.
 14. A method, comprising:determining, by at least one computing device, at least one timeinterval associated with a client application obtaining a contentfragment from a media distribution service; calculating, by the at leastone computing device, an estimated latency and an estimated bandwidthassociated with the at least one computing device, the estimated latencybased at least one the at least one time interval; determining, by theat least one computing device, a time to request a subsequent fragmentof a media item based at least in part on the estimated latency and theestimated bandwidth; calculating, by the at least one computing device,selection scores for a plurality of media sources based at least in parton whether individual ones of the plurality of sources satisfy at leastone selection rule; selecting, by the at least one computing device, oneof the plurality of sources based at least in part on the selectionscores; and requesting, by the at least one computing device, thesubsequent fragment at the time to request from the media distributionservice.
 15. The method of claim 14, further comprising applying, by theat least one computing device, the at least one selection rule to atleast one of the estimated latency, the estimated bandwidth, or acurrent state of a buffer.
 16. The method of claim 14, furthercomprising determining, by the at least one computing device, that theat least one selection rule is satisfied based at least in part on anestimated time to send a request to a respective source and download thesubsequent fragment meeting a predefined time threshold.
 17. The methodof claim 14, further comprising: projecting, by the at least onecomputing device, a duration of the media item stored in a buffer afterdownloading the subsequent fragment; and determining, by the at leastone computing device, that the at least one selection rule is satisfiedbased at least in part on the duration of the media item projected to bestored in the buffer meeting a predefined threshold.
 18. The method ofclaim 14, wherein selecting the one of the plurality of sources furthercomprises: determining a subset of the plurality of sources with theselection scores exceeding a threshold; and selecting one of the subsetof the plurality of sources corresponding to a highest quality level.19. The method of claim 18, wherein the highest quality levelcorresponds to at least one of a highest bit rate or a highestresolution.
 20. The method of claim 14, wherein selecting the one of theplurality of sources is further based at least in part on a languagesetting.